<!-- 分页组件 -->
<template>
  <div>
    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1" :page-sizes="[1, 2, 3, 4]" :page-size="2" layout="total, sizes, prev, pager, next, jumper" :total="4"> </el-pagination>
  </div>
</template>

<script>
import { mapState, mapMutations } from 'vuex'
export default {
  methods: {
    ...mapMutations(['changepagesize', 'getusermenu', 'changepagenum']),
    handleSizeChange(newval) {
      // console.log(newval)
      this.changepagesize(newval)
      this.getusermenu()
    },
    handleCurrentChange(newval) {
      // console.log(newval)
      this.changepagenum(newval)
      this.getusermenu()
    }
  },
  computed: {
    ...mapState({
      queryInfo: state => state.Users.queryInfo
    })
  }
}
</script>

<style></style>
